/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package backing;

import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import model.CurrentUser;
import officeboost.domain.ApplyPack;
import officeboost.domain.OfficeMgr;


/**
 *
 * @author XJ
 */
@ManagedBean
public class ApplicationRecordBacking extends AbstractBacking{
    @EJB
    private OfficeMgr om;
    private List<ApplyPack> applyList;

    public List<ApplyPack> getApplyList() {
        return applyList;
    }

    public void setApplyList(List<ApplyPack> applyList) {
        this.applyList = applyList;
    }
     
    public void init() {
        
        CurrentUser cu=(CurrentUser)getSessionMap().get("currentUser");
       
        applyList = om.getApplyList(cu.getUsername());
       // applyList.get(0).getFormType();
    }
    
    public String togo(String s){
        String outcome="leave_form";
        if(s.equals("LeaveForm"))
         outcome= "leave_form";
        return outcome;
    }
}
